﻿using System;

namespace QuartzExt
{
    /// <summary>
    /// 任务声明
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
    public class JobAttribute: Attribute
    {
        /// <summary>
        /// 任务标题
        /// </summary>
        /// <param name="title">标题</param>
        /// <param name="interval">时间间隔</param>
        public JobAttribute(string title,int interval)
        {
            Title = title;
            Interval = interval;
        }

        /// <summary>
        /// 任务标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 执行时间间隔，默认30秒
        /// </summary>
        public int Interval { get; set; }
        /// <summary>
        /// 任务分组
        /// </summary>
        public string Group { get; set; }
        /// <summary>
        /// 键名
        /// </summary>
        public string Name { get; set; }
    }
}
